import { PerspectiveCamera } from 'three'

interface CameraParams {
    fov: number,
    aspect: number,
    near: number,
    far: number,
    zoom?: number
}

function createPerspectiveCamera (params: CameraParams) : PerspectiveCamera {
    let camera = new PerspectiveCamera(params.fov, params.aspect, params.near, params.far)
    if (params.zoom !== undefined) {
        camera.zoom = params.zoom
    }
    return camera
}

export {
    createPerspectiveCamera
}
